Back


Goal 4: Quality Education

Children in day care, 3-5 years


FN 4.2.2 Number of children in day care (3-5 years)
# Import
OFXUKN1_raw <-
  statgl_url("OFXUKN1", lang = language) %>% 
  statgl_fetch(
    keyfigures             = "_3sum_ald_3_5_x",
    "daycare institutions" = 1:5,
    .col_code              = TRUE
    ) %>% 
  as_tibble()

# Transform
OFXUKN1 <-
  OFXUKN1_raw %>% 
  mutate(
    time = time %>% make_date(),
    `daycare institutions` = `daycare institutions` %>% fct_inorder()
    )

# Plot
OFXUKN1 %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = `daycare institutions`
  )) +
  geom_col() +
  scale_y_continuous(labels = scales::unit_format(
    suffix       = " ",
    big.mark     = ".",
    decimal.mark = ","
  )) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = FALSE, nrow = 2)) +
  labs(
    title    = sdg4$figs$fig1$title[language],
    subtitle = OFXUKN1[[2]][1],
    x        = " ",
    y        = sdg4$figs$fig1$y_lab[language],
    fill     = " ",
    caption  = sdg4$figs$fig1$cap[language]
  )

StatBank


# Transform
OFXUKN1 <-
  OFXUKN1_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(
    time = time %>% factor(levels = unique(time)),
    `daycare institutions` = `daycare institutions` %>% fct_inorder()
    ) %>% 
  spread(3, 4)

# Table
OFXUKN1 %>% 
  select(-2) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE) %>% 
  pack_rows(index = table(OFXUKN1[[2]])) %>% 
  add_footnote(
    sdg4$figs$fig1$foot[language], 
    notation = "symbol"
    )
2019 2020 2021 2022
Children 3-5 years
Nursery 153 231 345 371
Childcare 780 777 731 741
Intergrated daycare 1.000 965 981 926
Childminding 109 106 120 115
Other Daycare NA NA NA NA
* Number of children in day care
# Import
OFXUKN1_raw <-
  statgl_url("OFXUKN1", lang = language) %>%
  statgl_fetch(
    keyfigures             = "_3sum_ald_3_5_x",
    "daycare institutions" = 1:5,
    residence              = c("By", "Bygd"),
    .col_code              = TRUE
    ) %>% 
  as_tibble()

# Transform
OFXUKN1 <-
  OFXUKN1_raw %>% 
  mutate(
    `daycare institutions` = `daycare institutions` %>% fct_inorder(),
    residence  = residence %>% fct_inorder(),
    time = time %>% make_date(),
    )

# Plot
OFXUKN1 %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = `daycare institutions`
    )) +
  geom_col() +
  facet_wrap(~ residence, scales = "free_y") +
  theme_statgl() +
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = FALSE, nrow = 2)) +
  labs(
    title    = sdg4$figs$fig2$title[language],
    subtitle = OFXUKN1[[3]][1],
    x        = " ",
    y        = sdg4$figs$fig2$y_lab[language],
    fill     = NULL,
    caption  = sdg4$figs$fig2$cap[language]
  )

StatBank

# Transform
OFXUKN1 <- 
  OFXUKN1_raw %>% 
  #arrange(desc(time)) %>%
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(time = time %>% factor(levels = unique(time))) %>% 
  spread(4, 5)

# Table
OFXUKN1 %>% 
  select(-c(1, 3)) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE) %>% 
  pack_rows(index = table(OFXUKN1[[3]])) %>% 
  pack_rows(index = table(OFXUKN1[[1]])) %>% 
  add_footnote(
    sdg4$figs$fig2$foot[language], 
    notation = "symbol"
    )
2019 2020 2021 2022
Children 3-5 years
Settlement
Childcare 4 6 9 24
Childminding 106 100 116 104
Intergrated daycare 19 26 27 25
Nursery 31 38 42 41
Other Daycare NA NA NA NA
Town
Childcare 776 771 722 717
Childminding 3 6 4 11
Intergrated daycare 981 939 954 901
Nursery 122 193 303 330
Other Daycare NA NA NA NA
* Number of children in day care

Grade test results


FN 4.1.1 Problem-solving proficienty (pct. correct) in grade test results for children in 3rd and 7th grade (lower-secondary school)
# Import
UDXTKB_raw <-
  statgl_url("UDXTKB", lang = language) %>%
  statgl_fetch(
    subject   = px_all(),
    grade     = c(3, 7),
    unit      = "B",
    .col_code = TRUE) %>% 
  as_tibble()

# Transform
UDXTKB <-
  UDXTKB_raw %>% 
  mutate(
    time     = time %>% make_date(),
     subject =  subject %>% fct_inorder()
    )

# Plot
UDXTKB %>% 
  ggplot(aes(
    x     = time,
    y     = value,
    color = subject
    )) +
  geom_line(size = 2) +
  facet_wrap(~ grade) +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_color_statgl() +
  labs(
    title    = sdg4$figs$fig3$title[language],
    subtitle = UDXTKB[[3]][1],
    x        = " ",
    y        = " ",
    color    = sdg4$figs$fig3$color[language],
    caption  = sdg4$figs$fig3$cap[language]
  )

StatBank

Method


# Transform
UDXTKB <- 
  UDXTKB_raw %>% 
  arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(time = time %>% factor(levels = unique(time))) %>% 
  arrange(grade, desc(subject)) %>% 
  unite(combi, 1, 2, sep = ",") %>% 
  mutate(combi = combi %>% factor(levels = unique(combi))) %>% 
  spread(1, ncol(.))

vec      <- UDXTKB %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- table(vec[c(F, T)])
col_vec  <- vec[c(T, F)]

# Table
UDXTKB %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = table(UDXTKB[[1]]))
3rd grade
7th grade
Mathematics,3rd grade Greenlandic,3rd grade English,3rd grade Danish,3rd grade Mathematics,7th grade Greenlandic,7th grade English,7th grade Danish,7th grade
Problem-solving proficiency (pct. correct)
2023 52 48 NA 48 41 59 86 45
2022 48 41 NA 41 41 62 82 51
2021 51 48 NA 47 40 61 73 50
2020 51 41 NA 50 41 61 73 57
2019 52 45 NA 55 41 66 61 57



# Import
UDXTKB_raw <-
  statgl_url("UDXTKB", lang = language) %>%
  statgl_fetch(
    subject              = px_all(),
    grade                = c(3, 7),
    unit                 = "B",
    "place of residence" = 1:2,
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXTKB <-
  UDXTKB_raw %>% 
  mutate(
    time = time %>% make_date(),
    `place of residence` = `place of residence` %>% fct_inorder(),
    subject = subject %>% fct_inorder()
    )

# Plot
UDXTKB %>% 
  ggplot(aes(
    x     = time,
    y     = value,
    color = subject
  )) +
  geom_line(size = 2) +
  facet_grid(grade ~ `place of residence`) +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_color_statgl() +
  labs(
    title    = sdg4$figs$figX$title_fig4,
    subtitle = UDXTKB[[4]][1],
    x        = " ",
    y        = " ",
    color    = sdg4$figs$fig4$color[language],
    caption  = sdg4$figs$fig4$cap[language]
  )

StatBank

Method


# Transform
UDXTKB <- 
  UDXTKB_raw %>% 
  arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(time = time %>% fct_inorder()) %>% 
  arrange(grade, subject) %>% 
  unite(combi, 1, 2, 3, sep = ",") %>% 
  mutate(combi = combi %>% factor(levels = unique(combi))) %>% 
  spread(1, 4) 

vec       <- UDXTKB[-(1:2)] %>% colnames() %>% str_split(",") %>% unlist()
head_vec1 <- rep(vec[c(F, T, F)][1:8] %>% table(), 2)
head_vec2 <- vec[c(F, F, T)] %>% table()
col_vec   <- vec[c(T, F, F)]

UDXTKB %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec1)) %>% 
  add_header_above(c(" ", head_vec2)) %>% 
  pack_rows(index = table(UDXTKB[[1]]))
3rd grade
7th grade
Danish
English
Greenlandic
Mathematics
Danish
English
Greenlandic
Mathematics
Town,Danish,3rd grade Settlement,Danish,3rd grade Town,English,3rd grade Settlement,English,3rd grade Town,Greenlandic,3rd grade Settlement,Greenlandic,3rd grade Town,Mathematics,3rd grade Settlement,Mathematics,3rd grade Town,Danish,7th grade Settlement,Danish,7th grade Town,English,7th grade Settlement,English,7th grade Town,Greenlandic,7th grade Settlement,Greenlandic,7th grade Town,Mathematics,7th grade Settlement,Mathematics,7th grade
Problem-solving proficiency (pct. correct)
2023 50 36 NA NA 48 49 53 45 47 40 88 73 57 66 43 40
2022 41 43 NA NA 41 52 47 52 54 40 86 53 62 61 41 39
2021 48 39 NA NA 48 47 52 50 52 45 76 54 59 62 40 41
2020 50 52 NA NA 41 57 50 51 59 43 78 41 61 62 42 37
2019 55 55 NA NA 43 50 52 56 59 46 64 51 66 70 41 41



Final examination - lower secondary education


GS Marks for pupils in lower secondary education
# Import
UDXFKK_raw <-
  statgl_url("UDXFKK", lang = language) %>%
  statgl_fetch(
    unit             = "Avg",
    grade            = "FO",
    subject          = c("01", "02", "03", "04"),
    "type of grades" = 56:58,
    .col_code        = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXFKK <-
  UDXFKK_raw %>% 
  mutate(
    `type of grades` = `type of grades` %>% str_remove_all("Prøvekarakter -") %>% trimws() %>% str_to_title(),
    subject          = subject %>% fct_inorder(),
    time             = time %>% make_date()
    )

# Plot
UDXFKK %>% 
  ggplot(aes(
    x     = time,
    y     = value,
    color = `type of grades`
    )) +
  geom_line(size = 2) +
  facet_wrap( ~ subject, ncol = 2) +
  theme_statgl() + 
  scale_color_statgl(guide = guide_legend(nrow = 3)) +
  labs(
    title   = sdg4$figs$fig5$title[language],
    color   = sdg4$figs$fig5$color[language],
    x       = " ",
    y       = sdg4$figs$fig5$y_lab[language],
    caption = sdg4$figs$fig5$cap[language]
  )

StatBank

Method


# Transform
UDXFKK <-
  UDXFKK_raw %>% 
  mutate(
    `type of grades` = `type of grades` %>% 
      str_remove_all("Prøvekarakter -") %>%
      trimws() %>%
      str_to_title()
    ) %>% 
  #arrange(desc(time)) %>% 
  filter(
    value != "NA",
    time >= year(Sys.time()) - 5
    ) %>% 
  mutate(
    subject = subject %>% fct_inorder(),
    time = time %>% factor(levels = unique(time)),
    ) %>% 
  spread(5, 6) %>% 
  arrange(subject)

# Table
UDXFKK %>% 
  select(-(1:3)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = table(UDXFKK[[1]] %>% str_to_title())) %>% 
  pack_rows(index = table(UDXFKK[[3]])) %>% 
  add_footnote(UDXFKK[[2]][1], notation = "symbol")
2019 2021 2022 2023
Grade Point Average
Greenlandic
Mark - Oral 6,50 5,96 6,81 6,54
Mark - Proficiency Test 4,73 3,56 3,72 3,99
Mark - Written 4,81 5,35 5,48 4,75
Danish
Mark - Oral 4,54 5,36 4,85 6,15
Mark - Proficiency Test 5,03 4,47 4,14 4,05
Mark - Written 4,07 3,36 3,58 3,82
Mathematics
Mark - Oral 4,62 4,88 5,24 5,58
Mark - Proficiency Test 5,19 4,94 4,89 4,82
Mark - Written 2,44 2,17 2,52 2,98
English
Mark - Oral 5,32 6,49 6,52 6,99
Mark - Proficiency Test 5,05 4,90 5,20 5,56
Mark - Written 3,99 4,11 4,51 4,56
* School leavers - lower secondary education


Due to Covid-19 there has not been held final exams in 2020.



Transition from lower secondary education to further education


GS Transition from lower secondary education to upper secondary education
# Import
UDXTRFA1_raw <-
  statgl_url("UDXTRFA1", lang = language) %>% 
  statgl_fetch(
    "number of years after lower secondary education" = 2,
    "educational status"                              = px_all(),
    "graduation year"                                 = px_all(),
    .col_code                                         = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXTRFA1 <-
  UDXTRFA1_raw %>%
  filter(`graduation year` <= year(Sys.time()) - 3) %>% 
  mutate(`graduation year` = `graduation year` %>% make_date())

  


# Plot
UDXTRFA1 %>% 
  ggplot(aes(
    x    = `graduation year`,
    y    = value,
    fill = `educational status`
  )) +
  geom_col(position = "fill") +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  scale_fill_statgl(reverse = TRUE) +
  theme_statgl() +
  labs(
    title    = sdg4$figs$fig6$title[language],
    subtitle = sdg4$figs$fig6$sub[language],
    x        = sdg4$figs$fig6$x_lab[language],
    y        = " ",
    fill     = sdg4$figs$fig6$fill[language],
    caption  = sdg4$figs$fig6$cap[language]
  )

StatBank

Method


# Transform
UDXTRFA1 <- 
  UDXTRFA1_raw %>% 
  filter(`graduation year` <= year(Sys.time()) - 3) %>% 
  #arrange(desc(`graduation year`)) %>% 
  filter(`graduation year` >= year(Sys.time()) - 8) %>% 
  mutate(`graduation year` = `graduation year` %>% factor(levels = unique(`graduation year`))) %>% 
  spread(3, 4)

# Table
UDXTRFA1 %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE) %>% 
  add_footnote(
    sdg4$figs$fig6$foot[language],
    notation = "symbol"
  )
2016 2017 2018 2019 2020 2021
Dropped out 109 117 108 82 91 0
Graduated 6 4 7 5 7 0
In education 220 264 241 251 272 0
Not enrolled in education 320 301 342 310 314 0
* Number of people - transition from lower secondary education to upper secondary education (2 years after graduation)



# Import
UDXTRFA1_raw <-
  statgl_url("UDXTRFA1", lang = language) %>%
  statgl_fetch(
    "number of years after lower secondary education" = 2,
    "educational status"                              = px_all(),
    "graduation year"                                 = px_all(),
    gender                                            = px_all(),
    .col_code                                         = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXTRFA1 <-
  UDXTRFA1_raw %>% 
  filter(`graduation year` <= year(Sys.time()) - 3) %>% 
  mutate(`graduation year` = `graduation year` %>% make_date())

# Plot
UDXTRFA1 %>% 
  ggplot(aes(
    x    = `graduation year`,
    y    = value,
    fill = `educational status`
  )) +
  geom_col(position = "fill") +
  facet_wrap(~ gender) +
  scale_y_continuous(labels  = scales::percent_format()) +
  scale_fill_statgl(reverse = TRUE) +
  theme_statgl() +
  labs(
    title    = sdg4$figs$fig7$title[language],
    subtitle = sdg4$figs$fig7$sub[language],
    x        = sdg4$figs$fig7$x_lab[language],
    y        = " ",
    fill     = sdg4$figs$fig7$fill[language],
    caption  = sdg4$figs$fig7$cap[language]
  )

StatBank

Method


# Transform
UDXTRFA1 <- 
  UDXTRFA1_raw %>% 
  filter(`graduation year` <= year(Sys.time()) - 3) %>% 
  #arrange(desc(`graduation year`)) %>% 
  filter(`graduation year` >= year(Sys.time()) - 8) %>% 
  mutate(`graduation year` = `graduation year` %>% factor(levels = unique(`graduation year`))) %>% 
  spread(4, 5) %>% 
  arrange(`educational status`)
  
# Table
UDXTRFA1 %>% 
  select(-1, -3) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE) %>% 
  pack_rows(index = table(UDXTRFA1[[3]])) %>% 
  add_footnote(
    sdg4$figs$fig7$foot[language],
    notation = "symbol"
  )
2016 2017 2018 2019 2020 2021
Dropped out
Men 43 53 45 45 41 0
Women 66 64 63 37 50 0
Graduated
Men 5 3 7 3 7 0
Women 1 1 0 2 0 0
In education
Men 107 111 99 103 121 0
Women 113 153 142 148 151 0
Not enrolled in education
Men 152 153 173 173 172 0
Women 168 148 169 137 142 0
* Number of people - transition from lower secondary education to upper secondary education (2 years after graduation)



Transition from upper secondary school to further education


GS Transition from upper secondary education to further education
# Import
UDXTRGU2_raw <-
  statgl_url("UDXTRGU2", lang = language) %>%
  statgl_fetch(
    "number of years after graduation" = 2,
    "educational status"               = px_all(),
    "graduation year"                  = px_all(),
    .col_code = TRUE) %>% 
  as_tibble()

# Transform
UDXTRGU2 <-
  UDXTRGU2_raw %>% 
  filter(`graduation year` <= year(Sys.time()) - 3) |> 
  mutate(`graduation year` = `graduation year` %>% make_date())

# Plot
UDXTRGU2 %>% 
  ggplot(aes(
    x    = `graduation year`,
    y    = value,
    fill = `educational status`
    )) +
  geom_col(position = "fill") +
  scale_y_continuous(labels  = scales::percent_format(
    scale = 100, 
    accuracy = 1, 
    big.mark = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE) +
  labs(
    title    = sdg4$figs$fig8$title[language],
    subtitle = sdg4$figs$fig8$sub[language],
    x        = sdg4$figs$fig8$x_lab[language],
    y        = " ",
    fill     = sdg4$figs$fig8$fill[language],
    caption  = sdg4$figs$fig8$cap[language]
  )

StatBank

Method


# Transform
UDXTRGU2 <-
  UDXTRGU2_raw %>% 
  filter(`graduation year` >= year(Sys.time()) - 8 & `graduation year` < year(Sys.time()) - 2) %>% 
  mutate(`graduation year` = `graduation year` %>% factor(levels = unique(`graduation year`))) %>% 
  spread(3, 4)

# Table
UDXTRGU2 %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE) %>% 
  add_footnote(
    sdg4$figs$fig8$foot[language],
    notation = "symbol"
    )
2016 2017 2018 2019 2020 2021
Dropped out 69 61 46 49 54 0
Graduated 28 29 32 37 34 0
In education 157 134 137 129 114 0
not enrolled in education 91 104 89 88 93 0
* Number of people - transition from lower secondary education to further education (2 years after graduation)



# Import
UDXTRGU2_raw <-
  statgl_url("UDXTRGU2", lang = language) %>%
  statgl_fetch(
    "number of years after graduation" = 2,
    "educational status"               = px_all(),
    "graduation year"                  = px_all(),
    gender                             = px_all(),
    .col_code                          = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXTRGU2 <- 
  UDXTRGU2_raw %>% 
  filter(`graduation year` <= year(Sys.time()) - 3) |> 
  mutate(`graduation year` = `graduation year` %>% make_date())

# Plot
UDXTRGU2 %>% 
  ggplot(aes(
    x    = `graduation year`,
    y    = value,
    fill = `educational status`
  )) +
  geom_col(position = "fill") +
  facet_wrap( ~ gender) +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 100, 
    accuracy     = 1,
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE) +
  labs(
    title    = sdg4$figs$fig9$title[language],
    subtitle = sdg4$figs$fig9$sub[language],
    x        = sdg4$figs$fig9$x_lab[language],
    y        = " ",
    fill     = sdg4$figs$fig9$fill[language],
    caption  = sdg4$figs$fig9$cap[language]
  )

StatBank

Method


# Transform
UDXTRGU2 <-
  UDXTRGU2_raw %>% 
  #arrange(desc(`graduation year`)) %>% 
  filter(`graduation year` >= year(Sys.time()) - 7 & `graduation year` < year(Sys.time()) - 2) %>% 
  mutate(`graduation year` = `graduation year` %>% factor(levels = unique(`graduation year`))) %>% 
  spread(4, 5) %>% 
  arrange(`educational status`)

# Table
UDXTRGU2 %>% 
  select(-c(1, 3)) %>% 
  rename("  " = 1) %>% 
  statgl_table(replace_0s = TRUE) %>% 
  pack_rows(index = UDXTRGU2[[3]] %>% table()) %>% 
  add_footnote(
    sdg4$figs$fig9$foot[language],
    notation = "symbol"
  )
2017 2018 2019 2020 2021
Dropped out
Men 22 13 16 23 0
Women 39 33 33 31 0
Graduated
Men 10 13 10 12 0
Women 19 19 27 22 0
In education
Men 61 52 47 32 0
Women 73 85 82 82 0
not enrolled in education
Men 51 38 50 44 0
Women 53 51 38 49 0
* Number of people - transition from upper secondary education to further education (2 years after graduation)

Number of students


GS Number of students by level of education and country
# Import
UDXISC11B_raw <-
  statgl_url("UDXISC11B", lang = language) %>% 
  statgl_fetch(
    "level of education" = px_all(),
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXISC11B <-
  UDXISC11B_raw %>% 
  mutate(time                = time %>% make_date(),
        `level of education` = `level of education` %>%  fct_inorder() %>% fct_rev(),
        value                = value * 10^-3)

# Plot
UDXISC11B %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = `level of education`
  )) +
  geom_col() +
   guides(fill = guide_legend(nrow = 4, byrow = TRUE)) +
  theme_statgl() +
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = FALSE)) +
  labs(
    title   = sdg4$figs$fig10$title[language],
    x       = " ",
    y       = sdg4$figs$fig10$y_lab[language],
    fill    = NULL,
    caption = sdg4$figs$fig10$cap[language]
  )

StatBank


# Transform
UDXISC11B <-
  UDXISC11B_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 6) %>% 
  mutate(
         `level of education` = `level of education` %>% factor(levels = unique(`level of education`)),
         time                 = time %>% factor(levels = unique(time)),
         ) %>% 
  spread(2, 3)

# Table
UDXISC11B %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(
    sdg4$figs$fig10$foot[language],
    notation = "symbol"
    )
2018 2019 2020 2021 2022
Upper secondary education 1.156 1.121 1.171 1.164 1.147
Vocational education and training 1.133 1.081 1.131 1.029 1.027
Supplementary examination courses 60 29 29 14 18
Short-cycle higher education 199 195 172 157 184
Bachelors programme 315 324 374 358 346
Professional bachelors programme 586 560 550 528 524
Masters programme 170 183 171 167 160
* Number of active students



# Import
UDXISC11B_raw <-
  statgl_url("UDXISC11B", lang = language) %>% 
  statgl_fetch(
    country   = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

# Translate
UDXISC11B <-
  UDXISC11B_raw %>% 
  mutate(
    time    = time %>% make_date(),
    country = country %>% fct_reorder(value),
    value   = value * 10^-3
    )

# Plot
UDXISC11B %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = country
  )) +
  geom_col() +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = TRUE)) +
  labs(
    title   = sdg4$figs$fig11$title[language],
    x       = " ",
    y       = sdg4$figs$fig11$y_lab[language],
    fill    = " ",
    caption = sdg4$figs$fig11$cap[language] 
  )

StatBank


# Transform
UDXISC11B <-
  UDXISC11B_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 6) %>% 
  mutate(
    time    = time %>% fct_inorder(),
    country = country %>% fct_inorder
    ) %>% 
  spread(2, 3)

# Table
UDXISC11B %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(
    sdg4$figs$fig11$foot[language],
    notation = "symbol"
    )
2018 2019 2020 2021 2022
Schools in Greenland 3.068 2.952 3.073 2.952 2.903
Schools in Denmark 520 516 501 445 481
Schools abroad 31 25 24 20 22
* Number of students



FN 4.3.1 Number of students by gender
# Import
UDXISC11B_raw <-
  statgl_url("UDXISC11B", lang = language) %>% 
  statgl_fetch(
    gender    = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXISC11B <-
  UDXISC11B_raw %>% 
  mutate(
    time   = time %>% make_date(),
    gender = gender %>% reorder(value),
    value  = value * 10^-3
    )

# Plot
UDXISC11B %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = gender
  )) +
  geom_col() +
  theme_statgl() + 
  scale_fill_statgl() +
  labs(
    title   = sdg4$figs$fig12$title[language],
    x       = " ",
    y       = sdg4$figs$fig12$y_lab[language],
    fill    = " ",
    caption = sdg4$figs$fig12$cap[language]
  )

StatBank


# Transform
UDXISC11B <-
  UDXISC11B_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 6) %>% 
  mutate(time = time %>% fct_inorder()) %>% 
  spread(2, 3)

# Table
UDXISC11B %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(
    sdg4$figs$fig12$foot[language],
    notation = "symbol"
    )
2018 2019 2020 2021 2022
Men 1.424 1.373 1.364 1.292 1.262
Women 2.195 2.120 2.234 2.125 2.144
* Number of students



Number of Graduates


GS Number of graduates
# Import
UDXISC11D_raw <-
  statgl_url("UDXISC11D", lang = language) %>% 
  statgl_fetch(
    "level of education" = px_all(),
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXISC11D <-
  UDXISC11D_raw %>%
  mutate(
    time                 = time %>% make_date(),
    id                   = row_number(),
    `level of education` = `level of education` %>% str_remove("uddannelse"),
    `level of education` = `level of education` %>% fct_reorder(id, .fun = min, na.rm = TRUE) %>% fct_rev()
  )

# Plot
UDXISC11D %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = `level of education`
    )) +
  geom_col() +
  scale_y_continuous(labels = scales::number_format(
    accuracy     = 1,
    big.mark     = ".",
    decimal.mark = ",")) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = TRUE, nrow = 4)) +
  labs(
    title    = sdg4$figs$fig13$title[language],
    subtitle = sdg4$figs$fig13$sub[language],
    x        = " ",
    y        = sdg4$figs$fig13$y_lab[language],
    fill     = sdg4$figs$fig13$fill[language],
    caption  = sdg4$figs$fig13$cap[language] 
  )

StatBank

Method


# Transform
UDXISC11D <- 
  UDXISC11D_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 6) %>% 
  mutate(
    `level of education` = `level of education` %>% fct_inorder(),
    time                 = time %>% fct_inorder()
    ) %>% 
  spread(2, 3)

# Table
UDXISC11D %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(
    sdg4$figs$fig13$foot[language],
    notation = "symbol"
    )
2018 2019 2020 2021 2022
Upper secondary education 304 314 310 318 281
Vocational education and training 427 399 409 446 374
Supplementary examination courses 75 111 126 141 117
Short-cycle higher education 69 55 70 67 61
Bachelors programme 43 54 47 55 56
Professional bachelors programme 134 129 107 119 102
Masters programme 34 34 40 35 32
* Number of people - highest educational attainment



# Import
UDXISC11D_raw <-
  statgl_url("UDXISC11D", lang = language) %>%
  statgl_fetch(
    "level of education" = px_all(),
    gender               = px_all(),
    country              = c("A_SG", "B_SD"),
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXISC11D <- 
  UDXISC11D_raw %>% 
  mutate(
    `level of education` = `level of education` %>% str_remove("uddannelse") %>% trimws(),
    `level of education` = `level of education` %>% fct_inorder() %>% fct_rev(),
    gender               = gender  %>% fct_inorder(),
    country              = country %>% fct_inorder,
    time                 = time    %>% make_date()
  )

# Plot
UDXISC11D %>% 
  ggplot(aes(
    x = time,
    y = value, 
    fill = `level of education`
  )) +
  geom_col() +
  facet_grid(country ~ gender, 
             scales = "free_y") +
  scale_y_continuous(labels = scales::number_format(
    accuracy = 1, 
    big.mark = ".",
    decimal.mark = ","
    )) +
  theme_statgl() +
  scale_fill_statgl(reverse = TRUE, 
                    guide = guide_legend(reverse = TRUE, nrow = 4)) +
  labs(
    title    = sdg4$figs$fig14$title[language],
    subtitle = sdg4$figs$fig14$sub[language],
    x        = " ",
    y        = sdg4$figs$fig14$y_lab[language],
    fill     = sdg4$figs$fig14$fill[language],
    caption  = sdg4$figs$fig14$cap[language]
  )

StatBank

Method


# Transform
UDXISC11D <- 
  UDXISC11D_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 4) %>% 
  mutate(
    time                 = time %>% fct_inorder(),
    `level of education` = `level of education` %>% fct_inorder(),
    country              = country %>% fct_inorder()
    ) %>% 
  unite(combi, 2, 4, sep = ",") %>%  
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(2, 4)

vec      <- UDXISC11D[-(1:2)] %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- table(vec[c(F, T)]) %>% rev()
col_vec  <- vec[c(T, F)]

# Table
UDXISC11D %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  pack_rows(index = table(UDXISC11D[[1]])) %>% 
  add_header_above(c(" ", head_vec))
2022
2021
2020
Men,2020 Men,2021 Men,2022 Women,2020 Women,2021 Women,2022
Upper secondary education
Schools in Greenland 103 96 86 178 198 162
Schools in Denmark 9 7 17 13 14 13
Vocational education and training
Schools in Greenland 189 180 164 191 249 197
Schools in Denmark 12 9 7 17 8 5
Supplementary examination courses
Schools in Greenland 28 37 41 87 95 73
Schools in Denmark 1 2 1 10 7 2
Short-cycle higher education
Schools in Greenland 17 14 17 26 34 26
Schools in Denmark 14 7 8 13 12 10
Bachelors programme
Schools in Greenland 6 10 8 24 22 23
Schools in Denmark 5 5 8 12 15 15
Professional bachelors programme
Schools in Greenland 15 12 17 65 86 74
Schools in Denmark 11 6 4 16 13 7
Masters programme
Schools in Greenland 1 3 2 18 10 10
Schools in Denmark 3 10 6 13 11 13



Level of education among 35-39 year olds


GS Level of education among 35-39 year olds
# Import
UDXISCPROF_raw <-
  statgl_url("UDXISCPROF", lang = language) %>% 
  statgl_fetch(
    age                  = "35-39",
    "level of education" = c(20, 34, 35, 40, 50, 64, 65, 70, 80),
    .col_code = TRUE
    ) %>% 
  as_tibble()
  
# Transform
UDXISCPROF <-
  UDXISCPROF_raw %>% 
  mutate(
    id = row_number(),
    `level of education` = `level of education` %>% str_remove("uddannelse") %>% 
    fct_reorder(id, .fun = min, na.rm = T) %>% fct_rev()
    )

# Plot
UDXISCPROF %>% 
  mutate(time = time %>% make_date()) %>% 
  ggplot(aes(
    x    = time, 
    y    = value,
    fill = `level of education`
    )) +
  geom_area(position = "fill") +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl(base_size = 11) +
  guides(fill = guide_legend(nrow = 3, byrow = TRUE)) +
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = TRUE)) +
  labs(
    title    = sdg4$figs$fig15$title[language],
    subtitle = UDXISCPROF[[2]][1],
    x        = " ",
    y        = " ",
    fill     = NULL,
    caption  = sdg4$figs$fig15$cap[language]
  )

StatBank

Method


# Transform
UDXISCPROF <- 
  UDXISCPROF_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(
    time                 = time %>% fct_inorder(),
    `level of education` = `level of education` %>% fct_inorder()
    ) %>% 
  spread(3, 4)

# Table
UDXISCPROF %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = table(UDXISCPROF[[1]])) %>% 
  add_footnote(
    sdg4$figs$fig15$foot[language], 
    notation = "symbol"
    )
2019 2020 2021 2022
35-39 years
Lower secondary education 1.600 1.669 1.695 1.834
Upper secondary education 155 154 177 195
Vocational education and training 1.173 1.223 1.246 1.225
Supplementary examination courses 145 118 91 76
Short-cycle higher education 144 163 158 156
Bachelors programme 50 48 48 52
Professional bachelors programme 388 394 417 401
Masters programme 157 156 173 166
Phd. Programmes 2 7 9 6
* Number of people - highest educational attainment



# Import
UDXISCPROD_raw <-
  statgl_url("UDXISCPROD", lang = language) %>% 
  statgl_fetch(
    age                  = "35-39",
    "level of education" = c(20, 34, 35, 40, 50, 64, 65, 70, 80),
    "place of residence" = px_all(),
    .col_code            = TRUE
    ) %>% 
  as_tibble()
  
# Transform
UDXISCPROD <-
  UDXISCPROD_raw %>% 
  mutate(
    id                   = row_number(),
    `level of education` = `level of education` %>% str_remove("uddannelse") %>% 
           fct_reorder(id, .fun = min, na.rm = TRUE) %>% fct_rev(),
    time                 = time %>% make_date()
    )

# Plot
UDXISCPROD %>% 
  ggplot(aes(
    x    = time,
    y    = value,
    fill = `level of education`
    )) +
  geom_area(position = "fill") +
  facet_wrap(~ `place of residence`) +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl(base_size = 11) +
  guides(fill = guide_legend(nrow = 3, byrow = TRUE)) +
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = TRUE)) +
  labs(
    title    = sdg4$figs$fig16$title[language],
    subtitle = UDXISCPROD[[3]][1],
    x        = " ",
    y        = " ",
    fill     = NULL,
    caption  = sdg4$figs$fig16$cap[language]
  )

StatBank

Method


UDXISCPROD <-
  UDXISCPROD_raw %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(
    time = time %>% fct_inorder(),
    `level of education` = `level of education` %>% fct_inorder()
  ) %>% 
  arrange(`level of education`) %>% 
  unite(combi, 2, 4, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(2, ncol(.))

vec      <- colnames(UDXISCPROD[-(1:2)]) %>% str_split(",") %>% unlist()
head_vec <- table(vec[c(F, T)]) %>% rev()
col_vec  <- vec[c(T, F)]

UDXISCPROD %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec), replace_0s = TRUE) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  add_footnote(
    sdg4$figs$fig16$foot[language], 
    notation = "symbol"
    )
2022
2021
2020
2019
Town,2019 Town,2020 Town,2021 Town,2022 Settlements,2019 Settlements,2020 Settlements,2021 Settlements,2022
Lower secondary education 1.319 1.360 1.388 1.555 281 309 307 279
Upper secondary education 147 148 164 183 8 6 13 12
Vocational education and training 1.065 1.120 1.139 1.122 108 103 107 103
Supplementary examination courses 135 112 86 72 10 6 5 4
Short-cycle higher education 144 161 157 153 0 2 1 3
Bachelors programme 49 48 48 52 1 0 0 0
Professional bachelors programme 376 383 403 381 12 11 14 20
Masters programme 156 155 173 166 1 1 0 0
Phd. Programmes 2 7 9 6 0 0 0 0
* Number of people - highest educational attainment



Information and communation technology


FN 4.4.1 Proportions of 16-74 year olds with education in information and communication technology
# Import
UDXISCPROE_raw1 <-
  statgl_url("UDXISCPROE", lang = language) %>% 
  statgl_fetch(
    "level of education"  = c(35, 50, 64, 65, 70),
    "fields of education" = c("06"),
    .col_code             = TRUE
    ) %>% 
  as_tibble()

UDXISCPROE_raw2 <-
  statgl_url("UDXISCPROE", lang = language) %>% 
  statgl_fetch(
    "level of education" = "00",
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXISCPROE <-
  UDXISCPROE_raw1 %>% 
  rename(tæller = value) %>% 
  left_join(UDXISCPROE_raw2 %>% rename(nævner = value) %>% select(-1)) %>% 
  mutate(
    procent              = tæller / nævner * 100,
    `level of education` = `level of education` %>% str_remove("uddannelse"),
    time                 = time %>% make_date()
    )

# Plot
UDXISCPROE %>% 
  ggplot(aes(
    x    = time,
    y    = procent,
    fill = `level of education`
  )) +
  geom_col() +
  scale_y_continuous(labels = scales::percent_format(
    scale        = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE, palette  = "spring") +
  guides(fill = guide_legend(nrow = 2, byrow = TRUE)) +
  labs(
    title    = sdg4$figs$fig17$title[language],
    subtitle = sdg4$figs$fig17$sub[language],
    x        = " ",
    y        = " ",
    fill     = NULL,
    caption  = sdg4$figs$fig17$cap[language]
  )

StatBank

# Transform
UDXISCPROE <-
  UDXISCPROE_raw1 %>% 
  rename(tæller = value) %>% 
  left_join(UDXISCPROE_raw2 %>% rename(nævner = value) %>% select(-1)) %>% 
  mutate(
    procent              = tæller / nævner * 100,
    procent              = procent %>% round(1),
    `level of education` = `level of education` %>% str_remove("uddannelse")
    ) %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5) %>% 
  mutate(
    `level of education` = `level of education` %>% fct_inorder(),
    time                 = time %>% fct_inorder()
  ) %>% 
  select(-c(2, 4:5)) %>% 
  spread(2, 3)
  
# Table
UDXISCPROE %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(
    sdg4$figs$fig17$foot[language],
    notation = "symbol")
2019 2020 2021 2022
Vocational education and training 0,2 0,2 0,2 0,2
Short-cycle higher education 0,2 0,2 0,2 0,2
Bachelors programme 0,0 0,0 0,0 0,0
Professional bachelors programme 0,0 0,0 0,0 0,0
Masters programme 0,0 0,0 0,0 0,0
* Percentage of young people and adults with professional qualifications in information and communication technology